<html>
<head>
        <script async="" src="../js/Go/analitic.js"></script>
        <script src="../js/Go/go.js"></script>
        <script id="code" src="../js/Go/DiagramaCargo.js"></script>
</head>
<body onload="init()">
   
  <div id="myDiagram" style="border: 1px solid black; height: 500px; position: relative; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); cursor: auto; ">
  </div>
    
    
    <div id="propertiesPanel" style="display: none; border: 1px solid black; background-color: rgb(240, 248, 255);">
      <b>Properties</b><br>
      Name: <input type="text" id="name" value="" onchange="updateData(this.value, 'name')"><br>
      Title: <input type="text" id="title" value="" onchange="updateData(this.value, 'title')"><br>
      Comments: <input type="text" id="comments" value="" onchange="updateData(this.value, 'comments')"><br>
    </div>
  
  <div>
    <div>
      <button id="SaveButton" onclick="save()">Write</button>
      <button onclick="load()">Read</button>
      Diagram Model saved in JSON format:
    </div>
    <textarea id="mySavedModel" style="width:100%;height:250px">{ "class": "go.TreeModel",
        "nodeDataArray": [
      {"key":"1", "name":"Stella Payne Diaz", "title":"CEO" },
      {"key":"2", "name":"Luke Warm", "title":"VP Marketing/Sales", "parent":"1"},
      {"key":"3", "name":"Meg Meehan Hoffa", "title":"Sales", "parent":"2"},
      {"key":"4", "name":"Peggy Flaming", "title":"VP Engineering", "parent":"1"},
      {"key":"5", "name":"Saul Wellingood", "title":"Manufacturing", "parent":"4"},
      {"key":"6", "name":"Al Ligori", "title":"Marketing", "parent":"2"},
      {"key":"7", "name":"Dot Stubadd", "title":"Sales Rep", "parent":"3"},
      {"key":"8", "name":"Les Ismore", "title":"Project Mgr", "parent":"5"},
      {"key":"9", "name":"April Lynn Parris", "title":"Events Mgr", "parent":"6"},
      {"key":"10", "name":"Xavier Breath", "title":"Engineering", "parent":"4"},
      {"key":"11", "name":"Anita Hammer", "title":"Process", "parent":"5"},
      {"key":"12", "name":"Billy Aiken", "title":"Software", "parent":"10"},
      {"key":"13", "name":"Stan Wellback", "title":"Testing", "parent":"10"},
      {"key":"14", "name":"Marge Innovera", "title":"Hardware", "parent":"10"},
      {"key":"15", "name":"Evan Elpus", "title":"Quality", "parent":"5"},
      {"key":"16", "name":"Lotta B. Essen", "title":"Sales Rep", "parent":"3"}
       ]
    }
    </textarea>
  </div>




</body>
</html>
